package org.example.io;

import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class IOClient {
    public static void main(String[] args) throws Exception{
        Socket socket = new Socket();
        socket.connect(new InetSocketAddress(8000));

        while (true) {
            OutputStream outputStream = socket.getOutputStream();
            outputStream.write("helloworld".getBytes(StandardCharsets.UTF_8));

            Thread.sleep(2000);
        }
    }
}
